using LinearAlgebra, Plots
N = 100

y_true = [4.63014881 4.61966453 4.60928315 4.59900128 4.58881395
       4.57871446 4.56869433 4.55874323 4.54884889 4.53899712
       4.52917174 4.51935465 4.50952578 4.49966322 4.48974328
       4.47974062 4.46962841 4.45937852 4.44896171 4.43834792
       4.42750655 4.41640675 4.4050178  4.39330942 4.38125222
       4.36881803 4.35598036 4.3427148  4.32899941 4.31481518
       4.30014636 4.28498093 4.26931087 4.25313257 4.23644709
       4.21926049 4.20158401 4.18343432 4.16483366 4.14580996
       4.12639693 4.10663405 4.08656657 4.06624541 4.04572704
       4.02507327 4.00435099 3.98363187 3.96299193 3.94251112
       3.92227278 3.90236303 3.88287015 3.86388381 3.84549432
       3.82779179 3.81086526 3.79480183 3.77968569 3.76559727
       3.75261229 3.74080093 3.730227   3.72094721 3.71301048
       3.7064574  3.70131974 3.69762014 3.69537189 3.69457886
       3.69523552 3.69732717 3.70083019 3.70571253 3.71193417
       3.7194478  3.72819945 3.73812932 3.74917251 3.76125992
       3.77431902 3.78827474 3.80305029 3.8185679  3.83474961
       3.85151796 3.86879664 3.88651103 3.90458874 3.92296003
       3.94155821 3.96031992 3.97918537 3.99809853 4.01700724
       4.03586327 4.05462236 4.07324415 4.09169217 4.10993372]

y_true = reshape(y_true', N)

y_tilde = [4.63014881 4.61966453 4.60928315 4.29395187 4.40407013
       5.0685077  4.56869433 4.55874323 4.54884889 4.53899712
       4.52917174 4.51935465 4.50952578 4.49966322 4.48974328
       4.27032146 4.67904757 4.45937852 3.96719663 4.92011299
       4.10629626 4.73761703 4.4050178  4.00181557 4.77274607
       4.36881803 4.35598036 4.3427148  4.32899941 4.04897533
       4.18760373 4.66336341 4.26931087 4.25313257 4.0910517 
       4.36465588 4.20158401 4.18343432 3.99378883 4.31685479
       4.12639693 3.66391781 4.33062306 4.26490516 3.9361225 
       4.13467781 4.00435099 3.76624794 4.18037586 3.94251112
       3.92227278 3.44884275 4.33639044 3.86388381 3.84549432
       3.62539481 4.01326224 3.79480183 3.77968569 3.76559727
       3.6505171  3.84289611 3.730227   3.32204127 4.11191642
       3.23236308 4.17541406 3.2777783  3.90684541 3.66236006
       3.71564807 3.91750174 3.70083019 3.23883511 4.02796576
       3.87029363 3.72819945 3.73812932 3.74917251 3.76125992
       3.77431902 3.40586234 4.18546269 3.43552584 4.21779166
       3.85151796 3.5105719  4.24473577 3.90458874 3.81871921
       4.04579903 3.96031992 3.97918537 3.99809853 3.78812406
       4.26474645 3.8804247  3.89109953 4.13328813 4.42468004]

y_tilde = reshape(y_tilde', N)

function plot_helper(y_rec)
    """ This function is just here to help you create a plot.
        Just pass in your recovered y, y_rec. 
    """    
    x = collect(1:N)
    plot(x, y_true,label="true")
    plot!(x, y_tilde,label="obs")
    plot!(x, y_rec,label="rec")
    
    savefig("rec_series_late_reporting_jl.pdf")    
end